<?php
	$email = fetch("email");
	$password = fetch("password");
	if ($email!="" && $password!="" && $user = User::Authenticate($email, $password)) {
		//set session
		if ($user->Initialized) {
			$_SESSION[SESSION_AUTHENTICATION_GUID] = $user->UID;
			$notification = AUTHENTICATION_SUCCESS;
			$handleResult = true;
		} else {
			$notification = AUTHENTICATION_FAILED;
		}
	} else {
		$notification = AUTHENTICATION_FAILED;
	}
?>